package cn.smvc.sys.dao;

import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import cn.smvc.sys.entity.SysDict;

@Repository
public interface SysDictDao {
	
	public List<SysDict> findAll(SysDict dict) throws SQLException;
	
	public SysDict findOne(String id) throws SQLException;
	
	public int save(SysDict dict) throws SQLException;
	
	public int update(SysDict dict) throws SQLException;
	/**
	 * 通过id删除数据
	 * @param id
	 * @param type 0：真删除，1：假删
	 * @return
	 * @throws SQLException
	 */
	public int delete(String id, int type) throws SQLException;
	
	public int count(String where) throws SQLException;
	
	public List<SysDict> findBySql(String sql) throws SQLException;
	
	public List<SysDict> findByWhere(String where) throws SQLException;
	
	public List<SysDict> findPage(String where, int page, int limit, String orderBy) throws SQLException;
	
	public List<SysDict> findAllType() throws SQLException;
}
